<script>
    const myinstanceof = (A,B) =>{
        let p = A
        while (A){

            if(p == B.prototype){
                return true
            }
            p = p.__proto__
            return false
        }
    }
    let arr = []
    console.log(myinstanceof([],Object));
</script>